#define  _CRT_SECURE_NO_WARNINGS
class Solution {
public:
    vector<string> sortPeople(vector<string>& names, vector<int>& heights) {
        int size = names.size(), id[size];
        for (int i = 0; i < size; i++)
            id[i] = i;
        sort(id, id + size, [&](int i1, int i2) -> bool {
            return heights[i1] >= heights[i2];
            });
        vector<string> ret(size);
        for (int i = 0; i < size; i++)
            ret[i] = names[id[i]];
        return ret;
    }
};